package com.wclass.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 帖子
 * </p>
 *
 * @author SEN
 * @since 2018-12-27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("posts_info")
@SuppressWarnings("serial")
public class PostsInfo extends SuperEntity<PostsInfo> {


    /**
     * 是否删除 0：有效，1：禁用
     */
    @JSONField(serialize = false)
    @TableLogic
    private Integer state = 0;

    @ApiModelProperty("提交状态（0：已通过，1：审核中，2：未通过，3：已保存）")
    @TableField("submit_state")
    private Integer submitState;

    /**
     * 标题
     */

    @ApiModelProperty("标题")
    private String title;
    /**
     * 内容
     */
    @ApiModelProperty("内容")
    private String content;
    /**
     * 附件（json格式存储）
     */
    @ApiModelProperty("附件（json格式存储）")
    @TableField("attachment_url")
    private String attachmentUrl;
    /**
     * 点赞数
     */
    @ApiModelProperty("点赞数")
    @TableField("like_num")
    private Integer likeNum;
    /**
     * 收藏数
     */
    @ApiModelProperty("收藏数")
    @TableField("collect_num")
    private Integer collectNum;
    /**
     * 评论数
     */
    @ApiModelProperty("评论数")
    @TableField("comment_num")
    private Integer commentNum;
    /**
     * 发布人
     */
    @ApiModelProperty("发布人")
    @TableField("user_id")
    private Long userId;

    /**
     * 查看次数
     */
    @ApiModelProperty("查看次数")
    @TableField("see_num")
    private Integer seeNum;


    @ApiModelProperty("昵称")
    @TableField(value = "nick_name", exist = false)
    private String nickName;

    @ApiModelProperty("头像")
    @TableField(value = "picture_address", exist = false)
    private String pictureAddress;
    /**
     * 评级（1:A,2:B,3:C,4:D,5:E）
     */
    @ApiModelProperty("评级（1:A,2:B,3:C,4:D,5:E）")
    @TableField(value = "level", exist = false)
    private Integer level;

    @ApiModelProperty("职位")
    @TableField(value = "postname", exist = false)
    private String postname;

    @ApiModelProperty("是否点赞 0：否，1：是")
    @TableField(exist = false)
    private Integer whetherLike;

    @ApiModelProperty("是否收藏 0：否，1：是")
    @TableField(exist = false)
    private Integer whetherCollect;

    @TableField("course_type_id")
    private Long courseTypeId;

    @TableField(value = "courseTypeName", exist = false)
    private String  courseTypeName;

    @ApiModelProperty("是否关注 0：否，1：是")
    @TableField(exist = false)
    private Integer whetherFocus;

    @ApiModelProperty("角色类型(0:学生，1：老师）")
    @TableField(exist = false)
    private Integer type;

    @ApiModelProperty("封面")
    private String cover;

    @ApiModelProperty("附件")
    private String files;

}

